package com.webapp.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.webapp.domain.entity.CounselorDetail;

@Repository("counselorDetailDAO")
public class CounselorDetailDAO extends AbstractDAO<CounselorDetail>{

	public void insertCounselorDetail(CounselorDetail counselorDetail){
		save(counselorDetail);
	}
	
	public CounselorDetail selectCounselorDetail(Map<String, Object> map){
		List<Object> list = new ArrayList<Object>();
		String sql = "where 1=1 ";
		for(String key : map.keySet()){
			sql += "and "+key+"=? ";
			list.add(map.get(key));
		}
		return get(sql, list.toArray());
	}
	
//	public void updateCounselorDetail(CounselorDetail counselorDetail){
//		 getSession().update(counselorDetail);
//	}
	
}
